package com.gdth.service;

import org.greenrobot.eventbus.EventBus;

import com.gdth.bank.activity.WebViewActivity;
import com.gdth.bank.event.MessageEvent;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;



/**
 * Created by Administrator on 2018\5\26 0026.
 */

public class NotificationBroadcase extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {     // 获取到广播以后， 对界面进行处理
        String path = intent.getStringExtra("path");
        String name = intent.getStringExtra("name");
        String xxid = intent.getStringExtra("xxid");
        EventBus.getDefault().post(new MessageEvent(MessageEvent.NOTIFICATION_READ, xxid));
        Intent intents = new Intent(context, WebViewActivity.class);
        intent.putExtra("path", path);
        intent.putExtra("name", name);
        context.startActivity(intents);
//        ARouter.getInstance().
//                build("/userinfo/webViewActivity").
//                withString("path", path).
//                withString("name", name).
//                navigation();
    }
}
